{php $formdata = model_records::getNumFormData($row['id']);}
{php $formdata_common = Util::getSingelData('*', 'aide_form_data_common',array('rid'=>$row['id']));}
{php $activity = model_activity::getSingleActivity($row['activityid'], '*');}
{php $form = unserialize($activity['form']);}
{php $activityForm = model_activity::getNumActivityForm($row['activityid']);}
{php $formdata_common = empty($formdata_common)?getMember($row['openid']):$formdata_common}
<?php
if (!is_array($form['realname'])){//表单优化，数据兼容
	$sysform['realname']['title'] = $form['realname'];
	$sysform['realname']['need'] = 1;
	$sysform['realname']['show'] = $form['realnameshow'];

	$sysform['mobile']['title'] = $form['mobile'];
	$sysform['mobile']['need'] = 1;
	$sysform['mobile']['show'] = $form['mobileshow'];

	$sysform['gender']['title'] = $form['gender'];
	$sysform['gender']['need'] = $form['gendermust'];
	$sysform['gender']['show'] = $form['gendershow'];

	$sysform['birthyear']['title'] = $form['birthyear'];
	$sysform['birthyear']['need'] = $form['birthmust'];
	$sysform['birthyear']['show'] = $form['birthshow'];

	$sysform['resideprovince']['title'] = $form['resideprovince'];
	$sysform['resideprovince']['need'] = $form['residemust'];
	$sysform['resideprovince']['show'] = $form['resideshow'];
}else{
	$sysform = $form;
    $sysform['realname']['show'] = $form['realname']['show']=='' || $form['realname']['show']?1:0;
    $sysform['mobile']['show'] = $form['mobile']['show']=='' || $form['mobile']['show']?1:0;
    if (count($sysform)>2){
        $sysform['gender']['show'] = $form['gender']['show']=='' || $form['gender']['show']?1:0;
        $sysform['birthyear']['show'] = $form['birthyear']['show']=='' || $form['birthyear']['show']?1:0;
        $sysform['resideprovince']['show'] = $form['resideprovince']['show']=='' || $form['resideprovince']['show']?1:0;
    }
}?>
<div class="modal fade bs-example-modal-lg{$row['id']}" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
        	<form class="form-inline bv-form" method="post" action="" id="form-credit" novalidate="novalidate">
            <div class="modal-header">
                <button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button>
                <h4 class="modal-title">用户信息</h4>
            </div>
            <div class="modal-body">
                <table class="table table-cron table-hover table-bordered">
                    <tbody>
                    {if !empty($sysform)}
                        {php $sys_form = array_slice($sysform, 2);}
                        {loop $sys_form $k $v}
                            {if $v['show']=='' || $v['show']}
                            	<tr><th width="150">{$v['title']}</th><td>
                                {if $k=='gender'}
                                {php echo $formdata_common['gender']==0 ? '保密' :( $formdata_common['gender']==1?'男':'女')}
                                {elseif $k=='birthyear'}
                                {php echo $formdata_common['birthyear'].'年'.$formdata_common['birthmonth'].'月'.$formdata_common['birthday'].'日'}
                                {elseif $k=='resideprovince'}
                                {$formdata_common['resideprovince']}{$formdata_common['residecity']}{$formdata_common['residedist']}
                                {else}
                                {$formdata_common[$k]}
                                {/if}
                                </td></tr>
                            {/if}
                        {/loop}
                    {/if}
                    {loop $activityForm[0] $form}
                    {if $form['fieldstype']!=''}
                    	{if $form['fieldstype']=='gender'}
                            <tr><th width="150">{$form['title']}</th><td>{php echo $formdata_common['gender']==0 ? '保密' :( $formdata_common['gender']==1?'男':'女')}</td></tr>
                        {elseif $form['fieldstype']=='age'}
                            <tr><th width="150">{$form['title']}</th><td>{$formdata_common['age']} 岁</td></tr>
                        {elseif $form['fieldstype']=='birthyear'}
                             <tr><th width="150">{$form['title']}</th><td>{php echo $formdata_common['birthyear'].'年'.$formdata_common['birthmonth'].'月'.$formdata_common['birthday'].'日'}</td></tr>
                        {elseif $form['fieldstype']=='resideprovince'}
                            <tr><th width="150">{$form['title']}</th><td>{$formdata_common['resideprovince']}{$formdata_common['residecity']}{$formdata_common['residedist']}</td></tr>
                        {else}
                            <tr><th width="150">{$form['title']}</th><td>{$formdata_common[$form['fieldstype']]}</td></tr>
                        {/if}
                    {/if}
                    {/loop}
                    {loop $formdata $k $data}
                    {php $form = model_activity::getSingleActivityForm($data['formid']);}
                    {if !empty($form)}
                    <tr>
                        <th width="150">{$form['title']}</th>
                        <td>
                        {if $form['displaytype']==5 && $data['data']!=''}
                        <img src="{php echo tomedia($data['data']);}" height="100">
                        {elseif $form['displaytype']==6 && $data['data']!=''}
                            {php $pics = explode(',',$data['data']);}
                            {loop $pics $v}
                            <img src="{php echo tomedia($v);}" height="100" style="margin:0 5px 5px 0;">
                            {/loop}
                        {elseif $form['displaytype']==7}
                        {php echo str_replace(',','-',$data['data'])}
                        {else}
                        {php echo str_replace(',',' ',$data['data'])}
                        {/if}</td>
                    </tr>
                    {/if}
                    {/loop}
                    </tbody>
                </table>
            </div>
            <div class="modal-footer" style="padding: 5px 15px;">
				<a class="btn btn-danger js-cancel" aria-hidden="true" data-dismiss="modal">关闭</a>
			</div>
            </form>
        </div>
    </div>
</div>
